export default ({$axios}, inject) => {
  inject(`getCategoryList`, () => $axios.$get(`/blogServer/article/category/list`))


  inject(`getAdverList`, id => $axios.$get(`/blogServer/article/article/abvertList/${id}`))

  //分页查询  /article/api/article/list
  inject(`getArticleList`, query => $axios.$post(`/blogServer/article/article/pageQuery`, query))

  inject(`getArticleById`, id => $axios.$get(`/blogServer/article/article/articleDetailById/${id}`))

  inject(`updateArticleViewCountById`, id => $axios.$get(`/blogServer/article/article/updateArticleViewCountById/${id}`))

  inject(`updateArticleThumbById`, (articleId,count) => $axios.$get(`/blogServer/article/article/updateArticleThumbById/${articleId}/${count}`))

  inject(`getCommentByArticleId`, articleId => $axios.$get(`/blogServer/article/article/commentListByArticleId/${articleId}`))

  inject(`addComment`, data => $axios.$post(`/blogServer/article/article/insertComment`,data))

  inject(`deleteCommentById`, id => $axios.$get(`/blogServer/article/deleteCommentById/${id}`))

  inject(`getCategoryLabelList`, () => $axios.$get(`/blogServer/article/category/categoryLabelVoList`))

  inject(`addArticle`, data => $axios.$post(`/blogServer/article/article/insertOrUpdate`,data))

  inject(`updateArticle`, data => $axios.$post(`/blogServer/article/article/insertOrUpdate`,data))

  inject(`queryArticleByLabelId`, (data) => $axios.$post(`/blogServer/article/pageArticleByLabelId`,data))

}
